package pe.com.bn.sach.domain;

import java.util.Date;

/**
 * CustomerId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class CustomerId implements java.io.Serializable {

	// Fields

	private String firstName;
	private String lastName;
	private String address;
	private String city;
	private String country;
	private Date birthDate;

	// Constructors

	/** default constructor */
	public CustomerId() {
	}

	/** full constructor */
	public CustomerId(String firstName, String lastName, String address,
			String city, String country, Date birthDate) {
		this.firstName = firstName;
		this.lastName = lastName;
		this.address = address;
		this.city = city;
		this.country = country;
		this.birthDate = birthDate;
	}

	// Property accessors

	public String getFirstName() {
		return this.firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return this.lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return this.city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Date getBirthDate() {
		return this.birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof CustomerId))
			return false;
		CustomerId castOther = (CustomerId) other;

		return ((this.getFirstName() == castOther.getFirstName()) || (this
				.getFirstName() != null
				&& castOther.getFirstName() != null && this.getFirstName()
				.equals(castOther.getFirstName())))
				&& ((this.getLastName() == castOther.getLastName()) || (this
						.getLastName() != null
						&& castOther.getLastName() != null && this
						.getLastName().equals(castOther.getLastName())))
				&& ((this.getAddress() == castOther.getAddress()) || (this
						.getAddress() != null
						&& castOther.getAddress() != null && this.getAddress()
						.equals(castOther.getAddress())))
				&& ((this.getCity() == castOther.getCity()) || (this.getCity() != null
						&& castOther.getCity() != null && this.getCity()
						.equals(castOther.getCity())))
				&& ((this.getCountry() == castOther.getCountry()) || (this
						.getCountry() != null
						&& castOther.getCountry() != null && this.getCountry()
						.equals(castOther.getCountry())))
				&& ((this.getBirthDate() == castOther.getBirthDate()) || (this
						.getBirthDate() != null
						&& castOther.getBirthDate() != null && this
						.getBirthDate().equals(castOther.getBirthDate())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getFirstName() == null ? 0 : this.getFirstName().hashCode());
		result = 37 * result
				+ (getLastName() == null ? 0 : this.getLastName().hashCode());
		result = 37 * result
				+ (getAddress() == null ? 0 : this.getAddress().hashCode());
		result = 37 * result
				+ (getCity() == null ? 0 : this.getCity().hashCode());
		result = 37 * result
				+ (getCountry() == null ? 0 : this.getCountry().hashCode());
		result = 37 * result
				+ (getBirthDate() == null ? 0 : this.getBirthDate().hashCode());
		return result;
	}

}